<form role="form" action="" class="frm-operate" method="post" novalidate>
    <div class="card card-primary card-tabs">
        <div class="card-body">
            <div class="form-group row">
                <label for="frm-category_id" class="col-sm-2 col-12 col-form-label">{:lang("Select column")}：</label>
                <div class="col-sm-8 col-12">
                    <select id="frm-category_id" class="form-control">
                        {volist name="categoryList" id="vo"}
                        <option value="{$vo.id}" {if $category_id==$vo['id']}disabled{/if} data-title="{$vo.raw_title}">{$vo.title|raw}</option>
                        {/volist}
                    </select>
                </div>
            </div>
        </div>
        <div class="card-footer">
            <div class="row justify-content-around">
                <div class="col-sm-10">
                    <button type="button" class="btn btn-primary btn-submit">{:lang('Confirm')}</button>
                </div>
            </div>
        </div>
    </div>
</form>

{block:script}
<script>
    require(['admin'], function (admin) {

        $('.btn-submit').click(function (e) {
            var value = $('#frm-category_id').val();
            var index  = parent.layer.getFrameIndex(window.name);
            var callback = parent.$("#layui-layer" + index).data("callback");
            if (callback) {
                callback(value,$('#frm-category_id option:selected').attr('data-title'));
            }
            parent.layer.close(index);
        });
    })
</script>
{/block:script}